import { defineStore } from 'pinia'
import { store } from '../index'
import { cloneDeep } from 'lodash-es'

interface AppState {
  renderLoading: boolean
}

export const useAppStore = defineStore('app', {
  state: (): any => {
    return {
      // typeFlag: 0, //用于判断是选商品还是选商家 0是商品 1是商家
    }
  },
  getters: {
    // getTypeFlag(){
    //   return this.typeFlag
    // }
  },
  actions: {
    // setTypeFlag(typeFlag) {
    //   this.typeFlag = typeFlag
    // }
  }
})

export const useAppStoreWithOut = () => {
  return useAppStore(store)
}
